var table1 = document.getElementById('diyihang');
var table2 = document.getElementById('diyihang2');
var rightDiv = document.getElementById('yuanxingzuo');
var leftDiv = document.getElementById('yuanxingyou');
var shuZiDiv = document.getElementById('sz1');

var index = 1;

leftDiv.onclick = function () {
	index--;
	changeShowTable();
}
rightDiv.onclick = function () {
	index++;
	changeShowTable();
}


function changeShowTable(){
	if(Math.abs(index%2) == 1){
		table1.style.display = 'block';
		table2.style.display = 'none';
		shuZiDiv.innerHTML = '1';
	}else if(Math.abs(index%2) == 0){
		table1.style.display = 'none';
		table2.style.display = 'block';
		shuZiDiv.innerHTML = '2';
	}
}

var yinCang = document.getElementById('gengduoneirong');
var gengDuo = document.getElementById('gengduozhankai');
var flag = true;
gengDuo.onclick = function(){
	zhanKai();
	flag = !flag;
}
function zhanKai(){
	if(flag){
		yinCang.style.display = 'block';
	}else{
		yinCang.style.display = 'none';
	}
}
// gengDuo.onclick = function(){
// 	zhanKai();
// }

var dianYingDiv = document.getElementById('xdy');
var dianShiJuDiv = document.getElementById('xdsj');
var xianShiDiv1 = document.getElementById('xianshi1');
var xianShiDiv2 = document.getElementById('xianshi2');

dianYingDiv.onclick = function(){
	dianYingDiv.style.color = "black";
	dianShiJuDiv.style.color = "rgb(34,119,170)";
	xianShiDiv1.style.display = 'block';
	xianShiDiv2.style.display = 'none';
}
dianShiJuDiv.onclick = function(){
	dianShiJuDiv.style.color = "black";
	dianYingDiv.style.color = "rgb(34,119,170)";
	xianShiDiv1.style.display = 'none';
	xianShiDiv2.style.display = 'block';
}

var	changeDiv1 = document.getElementById('redu');
var changeDiv2 = document.getElementById('shijian');
var changeDiv3 = document.getElementById('pingjia');
var changeDiv4 = document.getElementById('meikanguo');
var changeDiv5 = document.getElementById('kezaixian');

var	dianDiv1 = document.getElementById('redu1');
var dianDiv2 = document.getElementById('shijian1');
var dianDiv3 = document.getElementById('pingjia1');
var dianDiv4 = document.getElementById('meikanguo1');
var dianDiv5 = document.getElementById('kezaixian1');

changeDiv1.onclick = function(){
	dianDiv1.style.display = 'block';
	dianDiv2.style.display = 'none';
	dianDiv3.style.display = 'none';
	dianDiv4.style.display = 'none';
	dianDiv5.style.display = 'none';
}
changeDiv2.onclick = function(){
	dianDiv1.style.display = 'none';
	dianDiv2.style.display = 'block';
	dianDiv3.style.display = 'none';
	dianDiv4.style.display = 'none';
	dianDiv5.style.display = 'none';
}
changeDiv3.onclick = function(){
	dianDiv1.style.display = 'none';
	dianDiv2.style.display = 'none';
	dianDiv3.style.display = 'block';
	dianDiv4.style.display = 'none';
	dianDiv5.style.display = 'none';
}
changeDiv4.onclick = function(){
	dianDiv1.style.display = 'none';
	dianDiv2.style.display = 'none';
	dianDiv3.style.display = 'none';
	dianDiv4.style.display = 'block';
	dianDiv5.style.display = 'none';
}
changeDiv5.onclick = function(){
	dianDiv1.style.display = 'none';
	dianDiv2.style.display = 'none';
	dianDiv3.style.display = 'none';
	dianDiv4.style.display = 'none';
	dianDiv5.style.display = 'block';
}